From 50f1c501a87ef5f5650750dbeca797e833ec7c3a Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Tue, 14 Nov 2023 12:39:09 +0100
Subject: refactor(components): replace Sharing with SharingWidget component

* all the widgets should have a coherent name
* fix mailto uri
* remove useless CSS
* add tests
---
 src/pages/article/[slug].tsx | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

(limited to 'src/pages/article/[slug].tsx')

diff --git a/src/pages/article/[slug].tsx b/src/pages/article/[slug].tsx
index d35541a..4eb7f2b 100644
--- a/src/pages/article/[slug].tsx
+++ b/src/pages/article/[slug].tsx
@@ -13,11 +13,12 @@ import {
   getLayout,
   Link,
   PageLayout,
-  Sharing,
+  SharingWidget,
   Spinner,
   type MetaItemData,
   Time,
   type CommentData,
+  Heading,
 } from '../../components';
 import {
   getAllArticlesSlugs,
@@ -301,6 +302,11 @@ const ArticlePage: NextPageWithLayout<ArticlePageProps> = ({
   );
 
   const pageUrl = `${website.url}${slug}`;
+  const sharingWidgetTitle = intl.formatMessage({
+    defaultMessage: 'Share',
+    id: 'HKKkQk',
+    description: 'SharingWidget: widget title',
+  });
 
   return (
     <>
@@ -335,11 +341,12 @@ const ArticlePage: NextPageWithLayout<ArticlePageProps> = ({
         title={title}
         withToC={true}
         widgets={[
-          <Sharing
+          <SharingWidget
             // eslint-disable-next-line react/jsx-no-literals -- Key allowed
             key="sharing-widget"
             className={styles.widget}
             data={{ excerpt: intro, title, url: pageUrl }}
+            heading={<Heading level={3}>{sharingWidgetTitle}</Heading>}
             media={[
               'diaspora',
               'email',
-- 
cgit v1.2.3

